arbitration Arbitration

The arbitration algorithm in Veronte is based on a scoring system. Each autopilot must send continuously a set of arbitration variables that will be used by the arbiter in order to calculate the score for each unit. Then, based on the scores and the current arbitration mode, the arbiter will choose to keep the current selected autopilot, or switching to one of the other units.

A Score is a 32 bit, single precission, floating-point value. This parameter is first computed resulting in a range between 0 and 0xFFFFFFFF, where 0 is a perfect score (Score’). To achieve a better understanding, Score’ is converted to a value comprehended between 0 an 100 (Score), being 100 the best possible score in the end.

Scores are calculated using the arbitration variables received from each autopilot at their dedicated addresses. After receiving the value, the following formula is used to compute the score for their respective unit:

../../_images/arbitration_formula.png

Where:

\(j\)

Variable index

\(x_{i,j}\)

j variable from autopilot i

\(\mu_j\)

j variable reference

\(d_{j,max}\)

Maximum allowed error

\(w_j\)

Weight of j variable

\(N\)

Number of variables

\(score'_i\)

Score’ of unit i

\(score_i\)

Score of unit i

Tip

The Arbitration weights should be used to increase or decrease the relevance that a certain arbitration variable has over the calculation of the score.

Any variable in Veronte can be used as an arbitration variable. Depending on the platform, operation, application, etc. the more relevant variables can be selected for its use as arbitration references.

Arbitration

CEX is able to output PWMs using arbitration in the same way Veronte Autopilot 4x does. This functionality has to be enabled as follows:

../../_images/arbitration.png

Arbitration panel

Master arbitration RX CAN Id is exclusive for CEX when it is used alongside a Veronte Autopilot 4x. If enabled, when an arbitration message is received from the Arbiter of the Autopilot 4x (with the CAN Id configured here), the selected autopilot will be updated according to the data received.

Config

Absolute Arbitration Variables

Absolute arbitration variables are indicators that are inherently good or bad, and so they are added directly to the score.

Examples of absolute arbitration variables are Link Quality, GNSS accuracy or warnings such as Sensors error or Position not fixed.

Relative Arbitration Variables

Relative arbitration variables are not inherently good or bad, and hence need to be compared against the other autopilots in order to calculate its score contribution.

The contribution to the score from a relative arbitration variable will be its Deviation from the Average of the same variable from each autopilot.

Examples of relative arbitration variables are Attitude, Position, measurements from sensors, etc.

Arbitration Example

Autopilot

Var. Nº

Veronte Variable

Type

\(x_{i,j}\)

\(\mu_j\)

\(w_j\)

Relative score

\(Score'_i\)

\(Score_i\)

1

1

Roll

Relative

0.12

0.096

1

0.054

0.043

95.67

2

Pitch

Relative

0.30

0.283

1

0.027

3

GNSS 1 Accuracy

Absolute

1.7

0.01

0.004

2

1

Roll

Relative

0.10

0.096

1

0.0011

0.0039

99.60

2

Pitch

Relative

0.28

0.283

1

0.0011

3

GNSS 1 Accuracy

Absolute

1.9

0.01

0.005

3

1

Roll

Relative

0.07

0.096

1

0.071

0.046

95.39

2

Pitch

Relative

0.27

0.283

1

0.017

3

GNSS 1 Accuracy

Absolute

1.5

0.01

0.0036

In the above example, AP2 is considered to be the best, since it has the highest total score. Even though its GNSS accuracy is the worst of all 3, its values for pitch and roll are the ones with the lower deviation from the mean.

Config panel

In this panel, the parameters of the arbiter algorithm are set.

../../_images/config_arbitration.png

Config panel

  1. Preferred: The preferred autopilot will be chosen in case of a score draw. Fixed while ok mode will always select this autopilot first.

  2. Method: The method of arbitration can be chosen by the user. The available options are:

    • Always best: It chooses always the best autopilot.

    • Change if worst: The arbiter will only switch if the currently selected autopilot has the worst score. In that case, it will switch to the one with the best score.

    • Round robin control: Using the Holding CAP time parameter, the arbiter will periodically switch between autopilots. This mode is meant for testing purposes only.

    • Fixed: Arbitration is disabled and one autopilot is selected. In this mode Autopilot 4x will behave as an Autopilot 1x.

      • Fixed 0: Autopilot 0 is selected.

      • Fixed 1: Autopilot 1 is selected.

      • Fixed 2: Autopilot 2 is selected.

    • Fixed while ok: This mode does not take into account scores. In this mode, the Preferred autopilot will be selected by default. A switch will only happen if the current autopilot is considered Dead.

  3. Holding CAP time: Amount of time needed from last switch in order to allow a new switch.

  4. Hysteresis: When comparing scores, the difference between them needs to be bigger than this proportional value, in order to assess scores. The difference is proportional to the score of the selected autopilot.

    i.e. If current selected autopilot is the number 1, arbitration mode is Always best, hysteresis is 0.5 and score for AP 1 is 0.3, AP 2 will need a score lower than 0.15 in order to be selected.

  5. Use external autopilot: Enables arbitration of external autopilot.

  6. Add button: Adds new arbitration variables.

Arbitration variables have the following configurable parameters:

  1. Max error: Arbitration maximum error for each variable.

  2. Weight: Arbitration weight for each variable.

  3. Absolute: If it is enabled, it will indicate that it is an absolute variable. The value set here will be used to compare the variables in order to choose the best autopilot.

Note

To delete variables click on “-“.

Currently, the maximum amount of arbitration variables supported is 32.

CAN Setup

Here users can configure the receiving CAN Ids for each of the 3 possible Veronte Autopilots 1x that are sending data to CEX. Therefore, to send data from any of them to the CEX, these Ids must be specified.

Note

If arbitration is not enabled, only the configuration of the Autopilot 0 will be used.

../../_images/can_setup_arbitration.png

CAN Setup panel

  1. Send status and Period: The user can enable status sending and set a status message period.

    Note

    The Send Status Period must be set to 0.2 s, otherwise, the arbitration algorithm will force the selection of autopilot 0.

  2. Send score and Period: Score sending can be enabled and a period of scoring messages can be set.

  3. Status message ID: CAN ID to which Status and Score messages are sent when there is no External Arbitration and therefore CEX works as arbiter.

    • Extended: If enabled, the frame format will be this, ‘Extended’, i.e. with a 29-bit identifier. Otherwise, the frame format ‘Standard’ (11-bit identifier) is set by default.

  4. Autopilot 0-2: CAN IDs used for the reception of Autopilot 4x arbitration messages for each AP.

    • Extended: If enabled, the frame format will be this, ‘Extended’, i.e. with a 29-bit identifier. Otherwise, the frame format ‘Standard’ (11-bit identifier) is set by default.